package com.netty.server.pool;

import java.util.concurrent.ThreadPoolExecutor;

import com.netty.server.threadpool.ExecutorPool;

/**
 * @author 作者 : 陈怀傲
 * @version 创建时间：2015年4月14日 下午2:19:58 类说明
 */
public class ThreadReadTask implements Runnable {
	private ThreadChannelBean channelBean;

	/**
	 * 添加数据
	 */
	public static void submit(ThreadChannelBean channelBean) {
		ThreadReadTask task = new ThreadReadTask(channelBean);
		ThreadPoolExecutor executor = ExecutorPool.getSingleton().getExecutor();
		executor.execute(task);
	}

	public void run() {
		ThreadChannelCall call = new ThreadChannelCall(channelBean);
		call.execute();
	}

	private ThreadReadTask() {
	}

	public ThreadReadTask(ThreadChannelBean channelBean) {
		this.channelBean = channelBean;
	}

}
